<div class="view">
	<table>
		<?php
		//$manager = Yii::app()->authManager;
		$userId = $model->_id;
		foreach ($auths as $auth) {
			echo '<tr>';
			echo CHtml::beginForm();
			echo CHtml::hiddenField('auth', $auth->name);
			echo '<td align="center">';
			if ($auth->isAssigned($userId)) {
				if ($auth->name == 'admin' && $userId == 1) {
					echo '[Default]';
				} else {
					echo CHtml::submitButton('Revoke', array('name'=>'action'));
				}
			} else {
				if ($auth->authManager->checkAccess($auth->name, $userId)) {
					echo '[Inherited]';
				} else {
					echo CHtml::submitButton('Assign', array('name'=>'action'));
				}
			}
			echo '</td>';
			echo "<td>$auth->description</td>";
			echo CHtml::endForm();
			echo '</tr>';
		}
		?>
	</table>

</div><!-- form -->